{load header}
<!--/H-->

    <!-- 内容区 -->
    <div id="main-content">
        <div id="top-alert" class="fixed alert alert-error" style="display: none;">
            <button class="close fixed" style="margin-top: 4px;">&times;</button>
            <div class="alert-content">这是内容</div>
        </div>
        <div id="main" class="main">
        <!-- nav --><!-- nav -->
            
	<div class="main-title">
		<h2>BANNER图片管理</h2>
	</div>
        
  <div class="tab-wrap">
     <div class="tab-content">       
	<div class="cf">
		<a class="btn" href="{eval echo site_url('contents/banner_add')}">新增BANNER图片</a>
                【
		<a {if !$Type}class="btn"{/if}  href="{eval echo site_url('contents/banner')}">全部</a> 
		<a {if $Type == 1}class="btn"{/if} href="{eval echo site_url('contents/banner')}?type=1">PC端-金融</a> 
		<a {if $Type == 2}class="btn"{/if} href="{eval echo site_url('contents/banner')}?type=2">移动-社区</a> 
		<a {if $Type == 3}class="btn"{/if} href="{eval echo site_url('contents/banner')}?type=3">众筹</a>
		<a {if $Type == 4}class="btn"{/if} href="{eval echo site_url('contents/banner')}?type=4">PC端-社区</a>
		<a {if $Type == 5}class="btn"{/if} href="{eval echo site_url('contents/banner')}?type=5">微信-社区</a>
		<a {if $Type ==6}class="btn"{/if} href="{eval echo site_url('contents/banner')}?type=6">IOS-贷款</a>
		<a {if $Type ==7}class="btn"{/if} href="{eval echo site_url('contents/banner')}?type=7">安卓-贷款</a>
		<a {if $Type ==8}class="btn"{/if} href="{eval echo site_url('contents/banner')}?type=8">移动-任务</a>
		<a {if $Type ==9}class="btn"{/if} href="{eval echo site_url('contents/banner')}?type=9">溜溜无忧banner</a>
		】
	</div>
	
	<div class="data-table table-striped">
		<table>
			<thead>
				<tr>
					<th>排序</th>
					<th>BANNER图</th>
					<th>跳转链接</th>
                                        <th>图片类别</th>
					<th>是否显示</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<!--{loop $list $val}-->
				<tr>
					<td>
                                            <form action="{eval echo site_url('contents/banner_setsort')}" method="post">
                                            <input type="hidden" name="id" value="{$val['id']}">
                                            <input type="text" name="sort" class="text" value="{$val['sort']}" style="width:20px;">
                                            </form>
                                        </td>
					<td><!--{if ($val['banner_img']!='')}--><img height="30" src="{$val['banner_img']}"><!--{/if}--></td>
                                        <td>{if $val['banner_link']}<a href="{$val['banner_link']}" target="_blank">{$val['banner_link']}</a>{else}javascript:void(0){/if}</td>
                                        <td>{$val['type']}</td>
                                        <td>
                                            <a title="<!--{if ($val['status'])=='0' }-->点击启用<!--{else}-->点击关闭<!--{/if}-->" href="{eval echo site_url('contents/banner_setstatus').'?id='.$val['id'].'&status='.abs(1-$val['status'])}" class="ajax-get"><!--{if ($val['status'])=='0' }--><span style="color:#ff0000">隐藏</span><!--{else}-->显示<!--{/if}--></a>
                                        </td>
					<td>
						<a title="编辑" href="{eval echo site_url('contents/banner_edit')}?id={$val['id']}">编辑</a>
						<a class="confirm ajax-get" title="删除" href="{eval echo site_url('contents/banner_del')}?id={$val['id']}">删除</a>
					</td>
				</tr>
				<!--{/loop}-->
			</tbody>
		</table>
		<!-- 分页 -->
	    <div class="page">
	        <div>
			{$showpage}
			<span class="rows">共 {$Total} 条记录</span>
			</div>
		</div>
		
	</div>
         </div>   
        </div>
<script type="text/javascript">
/* 实时更新分类信息 */
$(".tab-content").on("submit", "form", function(){
    var self = $(this);
    $.post(
        self.attr("action"),
        self.serialize(),
        "json"
    );
    return false;
}).on("focus","input",function(){
    $(this).data('param',$(this).closest("form").serialize());
}).on("blur", "input", function(){
    if($(this).data('param')!=$(this).closest("form").serialize()){
        $(this).closest("form").submit();
    }
});
</script>
<!--F-->{load footer}